Skip to content

mtl: enlarge HEAPMEM_SIZE to 0x60000 - #6925

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
libinyang:enlarge_mtl_heap
Jan 18, 2023
Merged

lgirdwood merged 1 commit into
thesofproject:mainfrom
libinyang:enlarge_mtl_heap

Conversation

@libinyang

Copy link
Copy Markdown
Contributor

The heap mem size is not large enough. Enlarge the size to 0x600000.

Signed-off-by: Libin Yang libin.yang@intel.com

The heap mem size is not large enough. Enlarge the size to 0x600000.

Signed-off-by: Libin Yang <libin.yang@intel.com>
@libinyang

Copy link
Copy Markdown
Contributor Author

WoV pipeline requires more heap mem. Otherwise the below error will happen:

[00:00:53.307,890] <inf> kpb: kpb_allocate_history_buffer: kpb_allocate_history_buffer(): allocated 246272 bytes
[00:00:53.307,896] <err> kpb: kpb_prepare(): failed to allocate space for KPB buffer
[00:00:53.307,901] <inf> kpb: kpb_free_history_buffer: kpb_free_history_buffer()
[00:00:53.307,968] <err> pipe: pipe:0 0x0 pipeline_prepare(): ret = -22, dev->comp.id = 917504

@btian1

btian1 commented Jan 10, 2023 •

Copy link
Copy Markdown
Contributor

There is no difference for the allocation for KPB, could you turn on -o app/perf_overlay.conf to check:

tr_info(&zephyr_tr, "heap allocated: %u free: %u max allocated: %u",
	stats.allocated_bytes, stats.free_bytes, stats.max_allocated_bytes);

heap allocated: 19256 free: 1329912

Heap total is around 1.3MB, Is MTL specific use above for HEAP size? ADL & TGL IPC4 use below:

#define heapmem ((uint8_t *)ALIGN_UP((uintptr_t)_end, PLATFORM_DCACHE_ALIGN))
#define HEAPMEM_SIZE ((uint8_t *)_heap_sentry - heapmem)

Thanks
Tim

@tmleman

tmleman commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

fyi @marcinszkudlinski

@tmleman

tmleman commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

The same change is made in #6785

Commit faf5ed5

@marcinszkudlinski

Copy link
Copy Markdown
Contributor

As for now it is OK to enlarge heap size
However, once loadable modules are introduced, it may need some adjustment

@lgirdwood

Copy link
Copy Markdown
Member

@marcinszkudlinski btw, when will this be dynamic or come from Zephyr ?

@lgirdwood

Copy link
Copy Markdown
Member

Rerun CI
@libinyang is this intended for merge ? its an RFC ?

@lgirdwood

Copy link
Copy Markdown
Member

SOFCI TEST

@libinyang libinyang changed the title [RFC] mtl: enlarge HEAPMEM_SIZE to 0x60000 mtl: enlarge HEAPMEM_SIZE to 0x60000 Jan 12, 2023
@libinyang

libinyang commented Jan 12, 2023 •

Copy link
Copy Markdown
Contributor Author

Rerun CI @libinyang is this intended for merge ? its an RFC ?

Yes, this is for merge. I have removed the "RFC".

@lgirdwood
lgirdwood merged commit 3acf3fa into thesofproject:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants